package com.androidx.p013lv.base.recycler;

import android.view.View;
import androidx.recyclerview.widget.RecyclerView;
import com.androidx.p013lv.base.listener.ItemClickListener;
import com.androidx.p013lv.base.listener.ItemLongClickListener;

/* renamed from: com.androidx.lv.base.recycler.BaseRecyclerHolder */
public class BaseRecyclerHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
    private ItemClickListener mListener = null;
    private ItemLongClickListener mLongClickListener = null;
    private int position;

    public BaseRecyclerHolder(View view) {
        super(view);
        view.setOnClickListener(this);
        view.setOnLongClickListener(this);
    }

    public void onClick(View view) {
        ItemClickListener itemClickListener = this.mListener;
        if (itemClickListener != null) {
            itemClickListener.onItemClick(view, this.position);
        }
    }

    public boolean onLongClick(View view) {
        ItemLongClickListener itemLongClickListener = this.mLongClickListener;
        if (itemLongClickListener == null) {
            return true;
        }
        itemLongClickListener.onItemLongClick(view, this.position);
        return true;
    }

    public void setItemListener(ItemClickListener itemClickListener, int i) {
        this.mListener = itemClickListener;
        this.position = i;
    }

    public void setItemListener(ItemLongClickListener itemLongClickListener, int i) {
        this.mLongClickListener = itemLongClickListener;
        this.position = i;
    }

    public ItemClickListener getItemListener() {
        return this.mListener;
    }
}
